---
title: clsProviderLocationCollection
summary: API reference for clsProviderLocationCollection.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-08-21
library: SAIF.Business.View.Provider
reference_type: embedded
---

# clsProviderLocationCollection

`clsProviderLocationCollection` loads sets of `clsProviderLocation` objects, either all locations belonging to one provider or all locations of a given provider type code (e.g., `"AT"` for attorney, as used by `clsRequestManager.ProviderList` in the consuming legal application). It provides post-retrieval filter helpers that apply the ineligibility-period business rule to exclude ineligible locations from a caller's working set.

## Purpose
- Retrieves the full location set for a provider (`clsProvider.ProviderLocations`) or for a provider type, reusing `clsProviderLocation.Criteria.RETRIEVE_SELECT_SQL` as its base query and appending a WHERE clause per filter type.
- Filters a loaded collection down to locations matching a provider type code, optionally excluding those ineligible as of a given date ([BR-PLOC-004](../../business-rules.md#br-ploc-004-ineligible-locations-are-excluded-from-filtered-lists)).
- Serves as the read-only source list consumed by application-layer attorney/provider lookups (`clsRequestManager`).*

## Context
- Namespace: `SAIF.Business.View.Provider`
- Assembly/package: `SAIF.Business.View.Provider` (embedded/project-compiled); also distributed as the NuGet package `SAIF.BOF.Business.View.Provider`.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `GetProviderLocations` | `Shared Function GetProviderLocations(dpi As IDataPortalInfo, providerID As Decimal) As clsProviderLocationCollection` | Retrieves all locations for a specific provider (OP-03, filter `ByProviderID`). |
| `GetProviderLocations` | `Shared Function GetProviderLocations(dpi As IDataPortalInfo, providerTypeCode As String) As clsProviderLocationCollection` | Retrieves all locations of a given provider type code (OP-03, filter `ByProviderTypeCode`), e.g., all attorney locations. |
| `FilterBy_ProviderTypeCode` | `Function FilterBy_ProviderTypeCode(providerTypeCode As String) As clsProviderLocationCollection` | Returns a subset of the loaded collection matching the type code, excluding locations ineligible as of today ([BR-PLOC-004](../../business-rules.md#br-ploc-004-ineligible-locations-are-excluded-from-filtered-lists)). |
| `FilterBy_ProviderTypeCodeAndEffectiveDate` | `Function FilterBy_ProviderTypeCodeAndEffectiveDate(providerTypeCode As String, effectiveDate As Date) As clsProviderLocationCollection` | Returns a subset matching the type code, excluding locations ineligible as of the supplied date ([BR-PLOC-004](../../business-rules.md#br-ploc-004-ineligible-locations-are-excluded-from-filtered-lists)). |
| `Item` | `Default ReadOnly Property Item(index As Integer) As clsProviderLocation` (from `clsBusinessCollection(Of clsProviderLocation)`) | Returns the location at the given position in the loaded collection. |
| `Count` | `ReadOnly Property Count As Integer` (from `clsBusinessCollection(Of clsProviderLocation)`) | Number of locations returned by the retrieval query or filter. |
| `IsValid` | `ReadOnly Property IsValid As Boolean` (overridden from collection base) | Reflects aggregate rule-check state of member locations; unused for gating any write since none exist. |
| `IsDirty` | `ReadOnly Property IsDirty As Boolean` (overridden from collection base) | Indicates in-memory changes to member locations; has no effect on persistence ([BR-DATA-001](../../business-rules.md#br-data-001-no-write-operations-are-supported)). |
| `Save` | `Function Save() As clsProviderLocationCollection` (overridden from collection base) | Calls `ApplyEdit()`/`MyBase.Save()` but cannot persist because no write SQL exists on the criteria ([BR-DATA-001](../../business-rules.md#br-data-001-no-write-operations-are-supported)).* |

## Behavioral notes
- OP-03: the criteria records a `ProviderLocationFilterTypes` value (`ByProviderID` or `ByProviderTypeCode`) plus the key; `RetrieveSQL` appends the corresponding WHERE clause (SQL-PLOC-02/SQL-PLOC-03), and `AfterRetrieve` loops the reader creating and `Load()`-ing one `clsProviderLocation` per row.
- `FilterBy_ProviderTypeCode` defaults the effective date used for ineligibility exclusion to `Today`, while `FilterBy_ProviderTypeCodeAndEffectiveDate` lets the caller specify the date explicitly ([BR-PLOC-004](../../business-rules.md#br-ploc-004-ineligible-locations-are-excluded-from-filtered-lists)).
- `ProviderLocationFilterTypes` (`ByProviderTypeCode`, `ByProviderID`) is declared `Protected Friend` and is therefore not part of this type's public surface, though it governs the internal retrieval branch selected by the two `GetProviderLocations` overloads.*

## Constraints and usage notes
- Callers relying on ineligibility exclusion should use the filter methods rather than the raw retrieval results, since `GetProviderLocations` itself performs no eligibility filtering.*
- The collection cannot persist any change to its member locations ([BR-DATA-001](../../business-rules.md#br-data-001-no-write-operations-are-supported)).

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts. Statements marked with `**` could not be confirmed; treat
> as unknown until verified.

## Sources
- SAIF.Business.View.Provider/clsProviderLocationCollection.vb
